package com.springboot.demo.design.pattern.processor.impl;

import com.springboot.demo.design.pattern.instruction.Instruction;
import com.springboot.demo.design.pattern.plugin.AfterPluginDefine;
import com.springboot.demo.design.pattern.plugin.FrontPluginDefine;
import com.springboot.demo.design.pattern.plugin.impl.UserLogAfterPlugin;
import com.springboot.demo.design.pattern.plugin.impl.UserLogFrontPlugin;
import com.springboot.demo.design.pattern.processor.Processor;
import org.springframework.transaction.annotation.Transactional;

/**
 * 用户处理器
 *
 * @author supu
 * @date 2019-03-19 16:23
 **/
public interface UserProcessor extends Processor {
    @FrontPluginDefine({UserLogFrontPlugin.class})
    @AfterPluginDefine({UserLogAfterPlugin.class})
    @Transactional
    void saveUser(Instruction<?,?> instruction);
}
